Allow a babl_malloc() call with size == 0 to succeed, returning a
dummy allocation, instead of asserting on this condition. The new
babl-palette code tries to allocate an empty buffer for the radii
array when creating a single-color palette, which would previously
lead to a crash.
char *ret;
int offset;
- babl_assert (size);
-
functions_sanity ();
ret = malloc_f (BABL_ALLOC + BABL_ALIGN + size);
if (!ret)